#ifndef _OSGIS_VIEWER_WIDGET_H_
#define _OSGIS_VIEWER_WIDGET_H_

#include <QTimer>
#include <QApplication>
#include <QGridLayout>
#include <QHBoxLayout>
#include <QListWidget>
#include <QStringListModel>

#include <osgViewer/CompositeViewer>
#include <osgViewer/ViewerEventHandlers>

#include <osgGA/TrackballManipulator>
#include <osgGA/StateSetManipulator>

#include <osgDB/ReadFile>

class ViewerWidget : public QWidget, public osgViewer::CompositeViewer
{
	Q_OBJECT
public:
	ViewerWidget();
	QWidget* setViewWidget( osg::Camera* camera);
	osg::Camera* createCamera( int x, int y, int w, int h, const std::string& name="", bool windowDecoration=false );
	virtual void paintEvent( QPaintEvent* event );
public:
	bool setScene(osg::Node* scene);
	osgViewer::View* getViewer();
protected:
	QTimer				_timer;
	osg::ref_ptr<osgViewer::View>	_view;
	QWidget*			_viewerWidget;
}; 

#endif